package com.google.code.qsecurity.server.locator;

import com.google.code.qsecurity.server.domain.PasswordRequest;
import com.google.web.bindery.requestfactory.shared.Locator;


public class PasswordRequestLocator extends Locator<PasswordRequest, String> {

	@Override
	public PasswordRequest create(Class<? extends PasswordRequest> clazz) {
		return new PasswordRequest();
	}

	@Override
	public PasswordRequest find(Class<? extends PasswordRequest> clazz, String id) {
		// TODO fix
		return create(clazz);
	}

	@Override
	public Class<PasswordRequest> getDomainType() {
		return PasswordRequest.class;
	}

	@Override
	public String getId(PasswordRequest domainObject) {
		return domainObject.getEmail();
	}

	@Override
	public Class<String> getIdType() {
		return String.class;
	}

	@Override
	public Object getVersion(PasswordRequest domainObject) {
		return domainObject.getVersion();
	}

}
